{include file="public/head"/}
<div class="container-fluid" id="main">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="alert alert-dismissable alert-info">
                <button type="button" class="close">×</button>
                <p></p>
            </div>
        </div>
    </div>
    <!--国家id和公司id 联系人和银行的添加从这里获取-->
    <input type="hidden" name="company_id" id="company_id" value="{$company_id|default=''}">
    <input type="hidden" name="country_id" id="country_id" value="{$country_id|default=''}">

    <div class="ntDesktop">
        <div class="ntDesktop-head">{:lang('cliente_company_information')}</div>

        <div class="row clearfix" style="padding-top:0px">
            <div class="col-md-8 col-sm-8">
                <ul class="nav nav-tabs" role="tablist">
                    <li  role="presentation" @click="getdata('detail')" class="active">
                        <a href="#table-info" role="tab" aria-controls="tab-info" data-toggle="tab">{:lang('more_information')}</a>
                    </li>
                    <li  role="presentation" @click="getdata('linkman','linkpage')">
                        <a href="#table-linkman" role="tab" aria-controls="tab-linkman" data-toggle="tab">{:lang('contact')}</a>
                    </li>
                    <li  role="presentation" @click="getdata('bank','bankpage')">
                        <a href="#table-bank" role="tab" aria-controls="tab-bank" data-toggle="tab">{:lang('bank_account')}</a>
                    </li>
                    <li  role="presentation">
                        <a href="#table-order" role="tab" aria-controls="tab-order" data-toggle="tab">{:lang('order_list')}</a>
                    </li>
                    <li  role="presentation">
                        <a href="#table-finance" role="tab" aria-controls="tab-finance" data-toggle="tab">{:lang('financial_flow')}</a>
                    </li>
                    <li  role="presentation">
                        <a href="#table-log" role="tab" aria-controls="tab-log" data-toggle="tab">{:lang('operation_subscription')}</a>
                    </li>
                </ul>
            </div>
            <div class="col-md-4 col-sm-4 text-right">
                <div>
                    <button type="button" class="btn btn-default" @click="returnlist"><span
                        class="glyphicon glyphicon-chevron-left"></span>{:lang('back_to_list')}</button>
                    <span style="padding:10px">&nbsp;</span>
                    <a href="{:url('companyedit',['company_id'=>$company_id])}" class="btn btn-primary" style="padding-left:48px;padding-right:48px;"> <span
                            class="glyphicon glyphicon-pencil"></span> {:lang('edit')} </a>
                </div>
            </div>
        </div>

        <div class="tab-content">
            <div role="tabpanel" class="tab-pane active" id="table-info">
                        <!-- 详细资料页面 -->
        <div class="row clearfix">
            <div class="col-md-12 column">
                <table class="table table-striped table-hover ntTable" v-cloak>
                    <tbody>
                    <tr>
                        <td>{:lang('company_type')}</td>
                        <td>{{details.cotypename}}</td>
                        <td>{:lang('belongs_to_seller')}</td>
                        <td>{{details.managename}}</td>
                    </tr>
                    <tr>
                        <td>{:lang('company_name')}</td>
                        <td colspan="3">{{details.name}}</td>
                    </tr>
                    <tr>
                        <td>{:lang('address')}</td>
                        <td colspan="3">{{details.address}}</td>
                    </tr>
                    <tr>
                        <td>{:lang('ZIP_CODE')}</td>
                        <td>{{details.zipcode}}</td>
                        <td>{:lang('status')}</td>
                        <td>{{details.status}}</td>
                    </tr>
                    <tr>
                        <td>{:lang('add')}</td>
                        <td>{{details.createname}}</td>
                        <td>{:lang('add_time')}</td>
                        <td>{{details.create_date}}</td>
                    </tr>
                    <tr>
                        <td>{:lang('update')}</td>
                        <td>{{details.updatename}}</td>
                        <td>{:lang('update_time')}</td>
                        <td>{{details.update_date}}</td>
                    </tr>
                    </tbody>
                </table>
                <table class="table table-striped table-hover ntTable">
                    <tbody>
                    <tr>
                        <td>{:lang('number_of_employees')}</td>
                        <td>{{details.worksnum}}</td>
                    </tr>
                    <tr>
                        <td>{:lang('remark')}</td>
                        <td>{{details.remarks}}</td>
                    </tr>
                    <tr v-for="(itemtext,index) in details.textdata">
                        <td>{:lang('text_attribute')}</td>
                        <td>{{itemtext}}</td>
                    </tr>
                    <tr v-for="(itemselect,index) in details.selectdata">
                        <td>{:lang('select_attribute')}</td>
                        <td>{{itemselect}}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="table-linkman">
                        <!-- 联系人页面 -->
        <div>
            <div class="row clearfix" id="table-linkman">
                <div class="col-md-12 column text-right">
                    <a href="{:url('customer/liaisonadd')}" class="btn btn-primary" data-toggle="modal" data-target="#linkman_Modal"><span
                            class="glyphicon glyphicon-plus"></span> {:lang('add_new_contact')}</a>
                </div>
            </div>
            <div class="row clearfix" >
                <div class="col-md-12 column">
                    <table class="table table-striped table-hover ntTable" v-cloak>
                        <thead>
                        <tr>
                            <th>{:lang('serial_number')}</th>
                            <th>{:lang('name')}</th>
                            <th>{:lang('main')}</th>
                            <th>{:lang('gender')}</th>
                            <th>{:lang('contact_information')}</th>
                            <th>{:lang('edit')}</th>
                            <th>{:lang('operate')}</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="(item,index) in linkarr">
                            <td align="center">{{item.id}}</td>
                            <td>{{item.name}}</td>
                            <td align="center">{{item.ismans}}</td>
                            <td align="center">{{item.sex}}</td>
                            <td v-html="item.contact">
                            </td>
                            <td> {{item.updatename}}<br/>
                                <small>{{item.update_date}}</small>
                            </td>
                            <td class="text-right">
                                <div>
                                    <a :href="'/admin/Customer/liaisonedit?linkid='+item.id"
                                       class="btn btn-sm btn-primary" data-toggle="modal"
                                       data-target="#linkman_Modal"><span
                                            class="glyphicon glyphicon-pencil"></span>{:lang('edit')}</a>
                                    <a href="javascript:;" @click.prevent="dellink(item.id,index)" class="btn btn-sm btn-default"><span
                                            class="glyphicon glyphicon-trash"></span>{:lang('delete')}</a>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <ul class="pagination" id="pagination_link">
                        </ul>
                </div>
            </div>
        </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="table-bank">
                        <!-- 银行账号页面 -->
        <div>
            <div class="row clearfix" id="table-linkman">
                <div class="col-md-12 column text-right">
                    <a href="{:url('customer/bankadd')}" class="btn btn-primary" data-toggle="modal" data-target="#bank_Modal"><span
                            class="glyphicon glyphicon-plus"></span> {:lang('add_new_account')}</a>
                </div>
            </div>
            <div class="row clearfix" id="table-linkman">
                <div class="col-md-12 column">
                    <table class="table table-striped table-hover ntTable" v-cloak>
                        <thead>
                        <tr>
                            <th>No.</th>
                            <th>{:lang('bank')}</th>
                            <th>{:lang('account_opening_bank_branch')}</th>
                            <th>{:lang('account_name')}</th>
                            <th>{:lang('account')}</th>
                            <th>{:lang('main')}</th>
                            <th>{:lang('edit')}</th>
                            <th>{:lang('operate')}</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="(item,index) in bank">
                            <td align="center">{{item.id}}</td>
                            <td>{{item.name}}</td>
                            <td>{{item.bankname}}</td>
                            <td>{{item.account_name}}</td>
                            <td>{{item.account_num}}</td>
                            <td align="center">{{item.ismans}}</td>
                            <td>{{item.updatename}}<br/>
                                <small>{{item.update_date}}</small>
                            </td>
                            <td class="text-right">
                                <div>
                                    <a :href="'/admin/Customer/bankedit?bankid='+item.id" class="btn btn-sm btn-primary" data-toggle="modal"
                                       data-target="#bank_Modal"><span class="glyphicon glyphicon-pencil"></span>{:lang('edit')}</a>
                                    <a href="javascript:;" @click.prevent="delbank(item.id,index)"
                                       class="btn btn-sm btn-default"><span
                                            class="glyphicon glyphicon-trash"></span>{:lang('delete')}</a>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <ul class="pagination" id="pagination_bank">
                        </ul>
                </div>
            </div>
        </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="table-order">
                        <!-- 订单页面 -->
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <h3 class="text-center">
                            待补充-订单页面
                        </h3>
                    </div>
                </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="table-finance">
                        <!-- 财务流水账目页面 -->
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <h3 class="text-center">
                        待补充-财务流水账目页面
                    </h3>
                </div>
            </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="table-log">
                        <!-- 操作记录页面 -->
        <div class="row clearfix" id="table-log">
            <div class="col-md-12 column">
                <h3 class="text-center">
                    待补充-操作记录页面
                </h3>
            </div>
        </div>
            </div>
          </div>
    </div>
</div>

<!-- 返回列表弹框 -->
<div class="modal fade" tabindex="-1" id="breaklist" role="dialog">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title">{:lang('notice')}</h4>
        </div>
        <div class="modal-body">
          <p>{:lang('do_you_still_have_unsaved_data_to_confirm_return？')}</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">{:lang('cancel')}</button>
          <button type="button" class="btn btn-primary savebtn" >{:lang('confirm')}</button>
        </div>
      </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
  </div>

<!--添加弹窗部分 开始-->
<div class="modal fade" id="linkman_Modal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel"
     aria-hidden="true"  data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" style="width:1000px">

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<div class="modal fade" id="bank_Modal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" style="width:1000px">

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<!--弹窗部分 结束-->
<script src="/static/Admin/js/companydetail.js"></script>
{include file="public/foot"/}